  <include file="application/home/view/public/header.html"/>
      <!-- /.aside -->
      <section id="content">
        <section class="vbox">
          <section class="scrollable padder">
             <header class="header bg-light bg-gradient b-b">
            <p>首页</p>
          </header>
          <section class="panel panel-default">
              <header class="panel-heading"> 会员激活详情 </header>
              <table class="table table-condensed table-hover">
				<thead>
				<tr>
					<th class='tt'>用户名</th>
					<th class='tt'>会员姓名</th>
					<th class='tt'>推荐人</th>
					<th class='tt'>状态</th>
					<th class='tt'>注册时间</th>
					<th class='tt'>等级</th>
				</tr>
				</thead>
				<tbody>
			
              <tr>
                <td class='tt'>{$member.account}</td>
                <td class='tt'>{$member.name}</td>
                <td class='tt'>{$member.zhuce_name}</td>
                <td class='tt'><eq name="member.status" value="0">未激活<else/>已激活</eq></td>
                <td class='tt'>{$member.add_time| date='Y-m-d H:i:s',###}</td>
                <td class='tt'>
                	{$level.name}

                </td>
               
              </tr>
              <tr>
                <td colspan="9">{$page}</td>
              </tr>
				</tbody>
				</table>   
				<div class="form-horizontal">
				<div class="form-body">
					
						<div class="form-group">
							<label class="col-md-3 control-label" id="ass">商品</label>
							<div class="col-md-5">
								<select name="gid" id="gid" class="form-control">
									<foreach name="goods" item="vg">
										<option value="{$vg.id}">{$vg.name}  数量：{$vg.gnum}</option>
									</foreach>
								</select>
							</div>
						</div>
                    <div class="form-group">
						<label class="col-md-3 control-label">开通金额</label>
						<div class="col-md-5">
							<input id="money" value="{$level.money}" class="form-control" placeholder="" disabled>
						</div>
					</div>
					<div class="form-group">
						<label class="col-md-3 control-label">{$account.name}余额</label>
						<div class="col-md-5">
							<input id="money" value="{$member_account}" class="form-control" placeholder="" disabled>
							<input  type="hidden" id="level" value="{$level.id}">
						</div>
					</div>
					
				</div>
				<div class="form-actions">
					<div class="row">
						<div class="col-md-offset-5 col-md-9 ">
							<button  onClick="sub({$member.member_id})" type="submit" class="btn green btn-primary">提交</button>		
						</div>
					</div>
				</div>
							
            </section>
          </section>
        </section>
        <a href="#" class="hide nav-off-screen-block" data-toggle="class:nav-off-screen" data-target="#nav"></a> </section>
      <aside class="bg-light lter b-l aside-md hide" id="notes">
        <div class="wrapper">Notification</div>
      </aside>
    </section>
  </section>
</section>
<script src="__PUBLIC__/home/js/app.v2.js"></script> <!-- Bootstrap --> <!-- App --> <script src="__PUBLIC__/home/js/charts/easypiechart/jquery.easy-pie-chart.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/sparkline/jquery.sparkline.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.tooltip.min.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.resize.js" cache="false"></script> <script src="js/charts/flot/jquery.flot.grow.js" cache="false"></script> <script src="__PUBLIC__/home/js/charts/flot/demo.js" cache="false"></script> <script src="__PUBLIC__/home/js/calendar/bootstrap_calendar.js" cache="false"></script> <script src="__PUBLIC__/home/js/calendar/demo.js" cache="false"></script> <script src="__PUBLIC__/home/js/sortable/jquery.sortable.js" cache="false"></script>
<script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
</body>
</html>
<script>
//激活
	function sub(id){
		var url = "{:U('Baodan/kaitong')}";
		var level = $('#level').val();//选择的等级id
		var gid = $('#gid').val();//选择商品的id
		if(level == ''){
			layer.msg('请选择等级');
			return;
		}
		$.post(url,{'level':level,'member_id':id,'gid':gid},function(data){
			if(data.status<0){
					layer.msg(data.info);		
				}else{
					layer.msg(data.info);
					setTimeout(function () { 
				        window.location.href="{:U('Member/jiegou')}"
				    }, 2000);
					
				}
			//setTimeout(function () { 
			  //    	 window.location.reload();
			//}, 2000);
		});
	}
//删除
	function del(id){
		var url = "{:U('Pay/jihuoDel')}";
		layer.confirm('您确定要删除？', {
		  	btn: ['确定','取消'] //按钮
		}, function(){
		  	$.post(url,{'member_id':id},function(data){
				if(data.status<0){
					layer.msg(data.info);		
				}else{
					layer.msg(data.info);
					setTimeout(function () { 
				        window.location.href="{:U('Member/jiegou')}"
				    }, 2000);
					
				}

			});
		}, function(){
		  	
		});
	}
</script>